<button class="layui-btn layui-btn-sm xinzeng2${object.code}" title="新增2">
	    <i class="layui-icon">${button.icon!'&#xe654;'}</i>
</button>
<script type="text/javascript">
//添加
function xinzeng2${object.code}(edit){
	var ref = $.getGetParasRef();
	var extra = '';
	if(ref != null)
		extra = '&ref='+ref;
    
	//程序会解析此字段
	var url = '/form/add/${object.code}?template=lay';url = url+'&menuCode=demo2_test&page=xinzeng2';
	var index = layui.layer.open({
        title : "新增2${object.name}",
        type : 2,
        content : url+extra,
        success : function(layero, index){
            var body = layui.layer.getChildFrame('body', index);
            if(edit){
                body.find(".newsName").val(edit.newsName);
                body.find(".abstract").val(edit.abstract);
                body.find(".thumbImg").attr("src",edit.newsImg);
                body.find("#news_content").val(edit.content);
                body.find(".newsStatus select").val(edit.newsStatus);
                body.find(".openness input[name='openness'][title='"+edit.newsLook+"']").prop("checked","checked");
                body.find(".newsTop input[name='newsTop']").prop("checked",edit.newsTop);
                form.render();
            }
            setTimeout(function(){
                layui.layer.tips('点击此处返回${object.name}列表', '.layui-layer-setwin .layui-layer-close', {
                    tips: 3
                });
            },500)
        }
    })
    layui.layer.full(index);
    //改变窗口大小时，重置弹窗的宽高，防止超出可视区域（如F12调出debug的操作）
    $(window).on("resize",function(){
        layui.layer.full(index);
    })
}

$(".xinzeng2${object.code}").click(function(){
	xinzeng2${object.code}();
	//var checkStatus = layui.table.checkStatus('gridTable')
    //,data = checkStatus.data;
    //layer.alert('len:'+data.length+','+JSON.stringify(data));
})
</script>